#pragma once

#include <afx.h>
#include <iostream>
#include <list>
#include <string>
#include <stack>

#include "Error.h"
#include "Variable.h"
#include "Statement.h"
#include "Function.h"

using namespace std;

class CProgram
{
public:
	CProgram();
	~CProgram();

	bool AddGlobal(CString Name, CVariable* var);
	bool AddFunction(CString Name, CFunction var);
	bool HasVariable(CString Name, CString fn);

protected:
	map<CString,CVariable*> m_GlobalVars;
	map<CString,CFunction> m_Functions;
	CFunction m_Main;
	stack<CFunction> m_Stack;
};